<template>
  <div>
    <search @getValue="getSonValue"></search>
    <div class="content" >
      <div class="contentitem u-m-tb-30" v-for="i in 4">
        <div class="contentitem_text">
          <p class="title">科 技 成 果 转 化</p>
          <p class="look u-m-t-30 ">点 击 查 看</p>
        </div>
        <img src="../../assets/特色服务/4.png" alt="">
      </div>
    </div>
    <div class="down" >
      <p class="u-m-tb-30" >下载专区</p>
      <div class="downbox">
        <div class="downitem pointer" :class="current==index?'active':''"  @click="changeitem(index)" v-for="(i, index) in 4">
          河南农业大学到账横向科技经费确认单（2024）
        </div>
      </div>

    </div>
  </div>
</template>

<script setup lang="ts">
import search from './search.vue';
import { ref } from 'vue';
const current = ref(0)
const getSonValue = (e: any) => {
  console.log(e);//子组件传入的值
}
const changeitem = (e: number) => {
  current.value = e
}
</script>
<style lang="scss" scoped>
.content {
  width: 1180px;
  margin: 50px auto;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  .contentitem {
    display: flex;
    align-items: center;
    padding: 30px;
    width: 45%;
    background: url('../../assets/特色服务/serve.png') no-repeat;
    background-size: 100% 100%;
    justify-content: space-between;
    img{
      width: 230px;
      height: 200px;
    }
    .contentitem_text {
      display: flex;
      flex-direction: column;
      align-items: start;

      .title {
        letter-spacing: 1px;
        font-weight: bold;
        font-size: 24px;
      }

      .look {
        font-size: 16px;
        font-weight: bold;
        padding: 10px 20px;
        background-color: rgb(30, 134, 249);
        color: #fff;
        text-align: center;
      }
    }
  }
}

.down {
  width: 1180px;
  box-sizing: border-box;
  margin: 0px auto;
  p{
    font-size: 20px;
    font-weight: bold;
  }
  .downbox {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    .downitem {
      font-size: 16px;
      width: 50%;
      position: relative;
      margin: 30px 0px;

      &::before {
        position: absolute;
        content: '';
        width: 10px;
        height: 10px;
        border: 1px solid #000;
        border-radius: 50%;
        left: -20px;
        top: 5px;
      }
    }
    .active{
      color: $text-color;
      &::before {
        position: absolute;
        content: '';
        width: 10px;
        height: 10px;
        border: 1px solid $text-color;
        border-radius: 50%;
        left: -20px;
        top: 5px;
      }
    }
  }

}
</style>